import styled from '@emotion/styled';

type WrapperProps = {
    red: boolean;
}

export const HWrapper = styled.div<WrapperProps>`
    background-color: ${({ red }) => red ? 'red' : '#97c4e3'};
    padding: 14px;
`;

export const Wrapper = styled.div`
    display: flex;
    flex-direction: column;
`;

export const Header = styled.h2`
    margin: 0;
`;

export const Papper = styled.div`
    box-shadow: 0 0 10px #afafafc2;
    margin: 24px auto;
`;

export const Form = styled(Papper)`
    padding: 24px;
`;

export const List = styled.ul`
    list-style: none;
    padding: 4px 16px;
`;

export const ListItem = styled.li`
    width: 50vw;
    display: flex;
    border-bottom: 1px solid black;
    margin-top: 8px;

    &:last-child {
        border: none;
    }
`;

export const DeleteButton = styled.button`
    background-color: transparent;
    border: none;
    margin-left: auto;
    padding: 8px;
`;

export const Input = styled.input<{ isError: boolean }>`
    border: 1px solid ${({ isError }) => isError ? 'red' : 'black'}
`;
